<?php

namespace app\model;

use think\facade\Db;

class MenuModel
{
    public static function addMenu($data){
        return Db::name("menu")->insert($data);
    }

    public static function seletAll(){
        $where = [
            ['is_del','!=',1],
        ];
//        Db::name('menu')->select($where);
        return Db::name('menu')->where('is_del','!=',1 )->where('parent_id',0)->select();
    }


    public static function updateMenu($id,$data){
        return Db::name('menu')->where('id',$id)->update($data);
    }
}